package com.mano.mall.api.gatewayhandler;

import com.alibaba.fastjson.JSONObject;
import com.mano.mall.api.dto.gatewayhandler.input.GatewayHandlerInputDTO;
import com.mano.mall.api.dto.gatewayhandler.output.GatewayHandlerOutputDTO;
import com.mano.mall.common.base.BaseResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * 网关handler的操作
 */
public interface GatewayHandlerService {

    @RequestMapping("/addGWHandler")
    @ApiOperation(value = "添加网关handler")
    public BaseResponse<JSONObject> addGWHandler(@Validated GatewayHandlerInputDTO gatewayHandlerInputDTO);

    @RequestMapping("/deleteGWHandler")
    @ApiOperation(value = "删除网关handler")
    public BaseResponse<JSONObject> deleteGWHandler(Integer id);


    @RequestMapping("/openGWHandler")
    @ApiOperation(value = "开启网关handler")
    public BaseResponse<JSONObject> openGWHandler(Integer id);

    @RequestMapping("/closeGWHandler")
    @ApiOperation(value = "关闭网关handler")
    public BaseResponse<JSONObject> closeGWHandler(Integer id);


    @RequestMapping("/upGWHandler")
    @ApiOperation(value = "上移网关handler")
    public BaseResponse<JSONObject> upGWHandler(Integer id);

    @RequestMapping("/downGWHandler")
    @ApiOperation(value = "下移网关handler")
    public BaseResponse<JSONObject> downGWHandler(Integer id);

    @RequestMapping("/getGWHandlerList")
    @ApiOperation(value = "获取网关handler 列表")
    public BaseResponse<List<GatewayHandlerOutputDTO>> getGWHandlerList();
}
